home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8677 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: druid.borland.com!usenet
  2. From: pete@borland.com (Pete Becker)
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1
  4. Subject: Re: GOTO controversy
  5. Date: 5 Mar 1996 21:29:43 GMT
  6. Organization: Borland International
  7. Message-ID: <4hibo7$nr1@druid.borland.com>
  8. References: <rcshlds.1.000A6705@mailserv.mta.ca> <Dn8pJ8.nqs@emi.net> <4grt4e$8fg@goanna.cs.rmit.EDU.AU> <4hhdcu$43p@due.unit.no>
  9. NNTP-Posting-Host: pbecker.borland.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <4hhdcu$43p@due.unit.no>, toriver@pvv.unit.no says...
  15. >
  16. >rav@goanna.cs.rmit.EDU.AU (++           robin) writes:
  17. >[original code example deleted for brevity, see
  18. ><URL:news:Dn8pJ8.nqs@emi.net> for details]
  19. >
  20. >>
  21. >>Is there any reason why the GOTOs can't be replaced by
  22. >>the particular action routine?
  23. >
  24. >As he said, backtracking. The alternative would be to include yet another
  25. >function call in each successive if-sentence, making the code ugly.
  26. >Using gotos, the code _can_ be made to express the intended flow much
  27. >better, as in his example.
  28. >
  29. >Are there any other languages than Prolog that implement a "machine" for
  30. >backtracking?
  31.  
  32. Yup: C++, through destructors.
  33.  
  34.